package org.wltea.analyzer.dic;

import org.apache.logging.log4j.Logger;
import org.wltea.analyzer.help.ESPluginLoggerFactory;

/**
 * @author ZH
 * @since: 2024/10/21
 */
public class DictReloadThread implements Runnable{
    private static final Logger logger = ESPluginLoggerFactory.getLogger(Dictionary.class.getName());
    @Override
    public void run() {
        while (true) {
            try {
                Thread.sleep(300000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            logger.info("============开始重新加载字典============");
            Dictionary.getSingleton().reLoadMainDict();
        }
    }
}
